import { createRouter, createWebHistory } from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import HomeView from '@/views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: to => {
        return { path: '/home' }
      },
    },
    {
      path: '/home',
      component: HomeView,
      children: [
        { path: 'dept', component: () => import('../views/subView/DeptView.vue') },
        { path: 'emp', component: () => import('../views/subView/EmpView.vue') },
        { path: 'other', component: () => import('../views/subView/OtherView.vue') },
        { path: 'system', component: () => import('../views/subView/SystemView.vue') },
      ]
    }

  ],
})

export default router
